//
//  GroupBuyViewController.m
//  彩票项目
//
//  Created by 伍银荣 on 2021/8/3.
//  Copyright © 2021 com.WYR. All rights reserved.
//

#import "GroupBuyViewController.h"
#import "WYRGroupBuyButton.h"
#import "UIView+Frame.h"

@interface GroupBuyViewController ()
@property (nonatomic, weak) UIView *blueView;

@end

@implementation GroupBuyViewController

-(UIView *)blueView {
    if (!_blueView) {
        UIView *blueView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, 0)];
        blueView.backgroundColor = [UIColor blueColor];
        [self.view addSubview:blueView];
        _blueView = blueView;
    }
    return _blueView;
}

- (IBAction)groupBuyBtnClick:(WYRGroupBuyButton *)sender {
    NSLog(@"点击了全部彩种按钮");
    
    [UIView animateWithDuration:0.25 animations:^{
        //三目运算
        self.blueView.h = self.blueView.h ? 0 : 200;
        //每次点击按钮自旋转小三角180度
        sender.imageView.transform = CGAffineTransformRotate(sender.imageView.transform, M_PI);
    }];
    
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self blueView];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
